package com.base.config;

import cn.dev33.satoken.stp.StpInterface;
import cn.dev33.satoken.stp.StpUtil;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class StpInterfaceImpl implements StpInterface {


    @Override
    public List<String> getPermissionList(Object o, String s) {
        return null;
    }

    @Override
    public List<String> getRoleList(Object o, String s) {
        ArrayList<String> arrayList = new ArrayList<>();
        String role = String.valueOf(StpUtil.getSession().get("role"));
        arrayList.add(role);
        return arrayList;
    }
}
